<!DOCTYPE html>
<html>


<!-- Mirrored from www.zi-han.net/theme/hplus/clients.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:44 GMT -->
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>{$sysname} - 推荐列表</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

    <link href="/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="/css/animate.min.css" rel="stylesheet">
    <link href="/css/style.min862f.css?v=4.1.0" rel="stylesheet">



    <link href="/css/css/style.css" rel="stylesheet">
    <script src="/js/js/jquery-1.11.3.min.js" type="text/javascript"></script>
    <script src="/js/js/respond.js" type="text/javascript"></script>
    <script src="/js/js/common.js" type="text/javascript"></script>
    <script src="/js/js/bootstrap-datetimepicker.min.js"></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content  animated fadeInRight">
        <div class="row">
            <div class="col-sm-8" style="width: 100%">
                <div class="ibox">
                    <div class="ibox-content">
                        <h2>推荐列表</h2>
                        <form action="{:U('User/search')}" method="post" name="myform" enctype="multipart/form-data">
                            <div class="input-group" style="width: 100%">
                                <input type="hidden" name="type" value="childlist" class="input form-control">
                                <input type="text" placeholder="输入用户名查找" value="{$keyword}" name="keyword" class="input form-control" style="width: 30%;float: left">
                                <div class="form-group" style="display: none">
                                    <label class="col-sm-2 control-label">普通：</label>
                                    <div class="col-sm-10">
                                        <input class="form-control layer-date" placeholder="YYYY-MM-DD hh:mm:ss" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})">
                                        <label class="laydate-icon"></label>
                                    </div>
                                </div>
                                <div class="form-group" style="display: none">
                                    <label class="col-sm-2 control-label">外部js调用：</label>
                                    <div class="col-sm-10">
                                        <input id="hello" class="laydate-icon form-control layer-date">
                                    </div>
                                </div>
                                <div class="form-group" style="display: none">
                                    <label class="col-sm-2 control-label">图标触发日期：</label>
                                    <div class="col-sm-10">
                                        <input readonly class="form-control layer-date" id="hello1">
                                        <label class="laydate-icon inline demoicon" onclick="laydate({elem: '#hello1'});"></label>
                                    </div>
                                </div>

                                <div class="form-group" style="float: left;width: 400px">
                                    <div class="col-sm-10" style="width: 100%;padding-right: 0">
                                        <input placeholder="开始日期" class="form-control layer-date" name="startdate" value="{$startdate}" id="start" style="width: 190px">
                                        <input placeholder="结束日期" class="form-control layer-date" name="enddate" value="{$enddate}" id="end" style="width: 190px">
                                    </div>
                                </div>

                            <span class="input-group-btn" style="float:left;">
                                <button type="submit" class="btn btn btn-primary"> <i class="fa fa-search"></i> 搜索</button>
                            </span>

                            </div>
                        </form>



                        <script src="/js/jquery.min.js?v=2.1.4"></script>
                        <script src="/js/bootstrap.min.js?v=3.3.6"></script>
                        <script src="/js/content.min.js?v=1.0.0"></script>
                        <script src="/js/plugins/layer/laydate/laydate.js"></script>
                        <script src="/js/plugins/layer/laydate/laydate.js"></script>
                        <script>
                            laydate({elem:"#hello",event:"focus"});var start={elem:"#start",format:"YYYY/MM/DD hh:mm:ss",min:"2018-05-01 23:59:59",max:"2099-06-16 23:59:59",istime:true,istoday:false,choose:function(datas){end.min=datas;end.start=datas}};var end={elem:"#end",format:"YYYY/MM/DD hh:mm:ss",min:laydate.now(),max:"2099-06-16 23:59:59",istime:true,istoday:false,choose:function(datas){start.max=datas}};laydate(start);laydate(end);
                        </script>
                        <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
                        <div class="clients-list">
                            <ul class="nav nav-tabs">
                                <span class="pull-right small text-muted">{$num} 个客户</span>
                                <li class="active"><a data-toggle="tab" href="#tab-1"><i class="fa fa-user"></i>推荐列表</a>
                                </li>
                            </ul>
                            <div class="tab-content">
                                <div id="tab-1" class="tab-pane active">
                                    <div class="full-height-scroll">
                                        <div class="table-responsive">
                                            <table class="table table-striped table-hover">
                                                <tbody>
                                                <th style="text-align: center">用户名称</th>
                                                <th style="text-align: center">推荐人数</th>
                                                <th style="text-align: center">注册时间</th>
                                                <th style="text-align: center">激活时间</th>
                                                <th style="text-align: center">操作</th>
                                                <foreach name="user" item="item">
                                                    <tr>
                                                        <td>
                                                            <a data-toggle="tab" href="#contact-1" class="client-link">{$item.username}</a>
                                                        </td>
                                                        <td>
                                                            <if condition="$item.childnum gt 0 ">
                                                                <a href="{:U('User/childlist',array('id'=>$item['id']))}">
                                                                    {$item.childnum}
                                                                </a>
                                                                <else/>
                                                                {$item.childnum}
                                                            </if>
                                                        </td>
                                                        <td> {:date('Y-m-d H:i:s',$item[reg_time])}</td>

                                                        <td>
                                                            <if condition="$item.activate_time gt 0 ">
                                                                {:date('Y-m-d H:i:s',$item[activate_time])}
                                                                <else/>
                                                                未激活
                                                            </if>
                                                        </td>
                                                        <td>
                                                            <a href="{:U('User/childtree',array('userid'=>$item[id]))}" class="label label-primary" style="<if condition="$item.id eq 1"> display: none </if>;margin-right:10px"   >
                                                            推荐结构
                                                            </a>
                                                        </td>

                                                    </tr>

                                                </foreach>
                                                </tbody>
                                            </table>
                                        </div>
                                        <input type="hidden" id="page_url" value="childlist">
                                        <include file="Public/Home/page.html" />
                                    </div>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="js/jquery.min.js?v=2.1.4"></script>
    <script src="js/bootstrap.min.js?v=3.3.6"></script>
    <script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <script src="js/content.min.js?v=1.0.0"></script>
    <script>
        $(function(){$(".full-height-scroll").slimScroll({height:"100%"})});
    </script>

    <script src="/js/bootstrap.js"></script>
    <script>
        // 	表单提交
        var bool = false;
        function toSubmit() {
            var name = $('#reservationName').val();
            var mobile = $('#reservationPhone').val();
            var id = $('#reservationId').val();
            // 		$('form').submit(function(){
            if ($("#endDate").val() == '') {
                showMsg('请选择离店时间！');
                bool = false;
                return bool;
            } else {
                bool = true;
            }
            if (bool) {
                var sdate = new Date($("#startDate").val());
                var edate = new Date($("#endDate").val());

            }
            // 		});
        }
        var obj;
        // var id = ${roomId};
        // var sdate = new Date();
        var sdate = '2018-07-01';
        // $.post('../hotel/roomOrder',{id:id},function(data){
        //   if(data.code==1000){
        //     if(data.result.hotelOrder.leaveTime != undefined){
        //       if(data.result.hotelOrder.leaveTime.time > new Date().getTime()){
        //         sdate = new Date(data.result.hotelOrder.leaveTime.time);
        //       }
        //     }
        //   }

        // 	alert(sdate);
        //     $.post('../hotel/reservatTime',{id:id},function(data){
        //       obj = data.result;
        obj = ['', '', '']; //禁用日期可以从数据库查
        // 	自定义格式
        $.fn.datetimepicker.dates['zdy'] = {
            days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
            daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
            daysMin: ["日", "一", "二", "三", "四", "五", "六"],
            months: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
            monthsShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
            today: "今天",
            format: "yyyy-mm-dd",
            titleFormat: "yyyy-mm-",
            weekStart: 1,
            suffix: [],
            meridiem: ["上午", "下午"]
        };
        $('#startDate').datetimepicker({
            language: 'zdy',
            weekStart: 1,
            todayBtn: 1,
            autoclose: 1,
            startDate: sdate,
            minView: 2,
            maxView: 3,
            onRenderDay: function(date) {
                // 	    	alert(date);
                var date1 = date.getFullYear() + '-' +
                        (date.getMonth() < 9 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) +
                        '-' +
                        (date.getDate() < 10 ? '0' + (date.getDate() - 1) : date.getDate() - 1);
                // for(var o in obj){
                //   if(date1==obj[o]){
                //     return ['disabled'];
                //   }
                // }

            }
        }).on('changeDate', function(ev) {
            // 		alert($("#startDate").val());
            $('#endDate').datetimepicker('remove');
            $('#endDate').val('');
            var sdate = $("#startDate").val();
            var edate;
            for (var o in obj) {
                if (new Date(sdate) <= new Date(obj[o])) {
                    var date = new Date(obj[o])
                    var ndate = +date + 24 * 60 * 60 * 1000;
                    var leaveTime = new Date(ndate);
                    edate = leaveTime.getFullYear() + '-' + (leaveTime.getMonth() + 1) + '-' + leaveTime.getDate();

                    break;
                }
            }
            // 			alert(edate);
            $('#endDate').datetimepicker({
                language: 'zdy',
                weekStart: 1,
                todayBtn: 1,
                autoclose: 1,
                startDate: sdate,
                endDate: edate,
                minView: 2,
                maxView: 3
            }).on('changeDate', function(ev) {
                // 		            alert(o+++"~~")
            });
        });
        // });
        // });
        $("#endDate").click(function() {
            if ($("#startDate").val() != '') {

            } else {
                showMsg('请先选择时间！');
            }
        });
    </script>

    <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
</body>


<!-- Mirrored from www.zi-han.net/theme/hplus/clients.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:44 GMT -->
</html>
